package com.example.t410.controller;
import com.alibaba.fastjson.JSONObject;
import com.example.t410.service.ModulesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@CrossOrigin
@RequestMapping("/common")
public class CommonController {
    @Autowired
    private ModulesService modulesService;

    JSONObject jsonObject = new JSONObject();

    @GetMapping("/test")
    public JSONObject getDefaultTest()
    {
        log.info("测试模块查询");
        jsonObject.clear();
        jsonObject.put("status","200");
        jsonObject.put("data",modulesService.getDefaultTest());
        return jsonObject;
    }
}
